#-------------------------------------------------------
# Copyright (c) YY
# All rights reserved.
# History:
# 		<Author>	<Time>		<Version>	  <Des>
#      guoyou		2017-8-29	1.0		
#-------------------------------------------------------
PROJECT(DMWebTest) 

#-------------------------------------------------------------------------------------------------------------------
file(GLOB ROOT_HEADER 									inc/*h)
file(GLOB ROOT_SOURCE 									src/*.cpp;src/*.c)


source_group("inc"								FILES 	${ROOT_HEADER})
source_group("src"								FILES 	${ROOT_SOURCE})

#-------------------------------------------------------------------------------------------------------------------
use_precompiled_header(DMWebTest  "${CMAKE_CURRENT_SOURCE_DIR}/inc/StdAfx.h"
								  "${CMAKE_CURRENT_SOURCE_DIR}/src/StdAfx.cpp")
  
 #-------------------------------------------------------------------------------------------------------------------
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/inc
					${CMAKE_CURRENT_SOURCE_DIR}/)

include_directories(${PROJDIR}/DmMain/inc
					${PROJDIR}/DmMain/inc/Common;
					${PROJDIR}/DmMain/inc/Common/Template;
					${PROJDIR}/DmMain/inc/Core;
					${PROJDIR}/DmMain/inc/Core/Msg;
					${PROJDIR}/DmMain/inc/Core/Dui;
					${PROJDIR}/DmMain/inc/Core/Event;
					${PROJDIR}/DmMain/inc/IDmMain;
					${PROJDIR}/DmMain/inc/Modules;
					${PROJDIR}/DmMain/inc/Widgets;
					${PROJDIR}/PluginWeb/inc;)

#--------------------------------------------------------------------------------------------
ADD_DEFINITIONS(-DUNICODE -D_UNICODE)  # unicode
ADD_EXECUTABLE(DMWebTest  WIN32 ${ROOT};${ROOT_HEADER};${ROOT_SOURCE};)
SET_TARGET_PROPERTIES(DMWebTest PROPERTIES OUTPUT_NAME "DMWebTest")

add_custom_command(TARGET DMWebTest 
					PRE_BUILD 
					COMMAND call ${PROJDIR}/CMake/PreBuild-DMWeb.cmd $(TargetDir)
					COMMENT "This command will be executed before build target DMWebTest"
					)
#--------------------------------------------------------------------------------------------
add_dependencies(DMWebTest  DmMain)
add_dependencies(DMWebTest  PluginWeb)

 